package com.ttn.common.core.entity.studentrecord;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 用户学习时间记录表
 */
@Data
@TableName(value = "learning_progress_time_record")
public class LearningProgressTimeRecord implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 学员id
     */
    @TableField(value = "student_id")
    private Integer studentId;

    /**
     * 单元id
     */
    @TableField(value = "course_unit_id")
    private Integer courseUnitId;

    /**
     * 单元任务(1词汇2听力3语法4口语)
     */
    @TableField(value = "unit_task_type")
    private Integer unitTaskType;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 学习时长(秒)
     */
    @TableField(value = "study_time")
    private Integer studyTime;

    /**
     * 级别
     */
    @TableField(value = "grade")
    private Integer grade;
    /**
     * 开始学习时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value = "study_time_start")
    private Date studyTimeStart;
    /**
     * 结束学习时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value = "study_time_end")
    private Date studyTimeEnd;
}